package Adapter.impl;

import Adapter.service.SpecUserService;
import com.google.gson.Gson;

import java.util.List;
import java.util.Map;

/**
 * @author chengjunjie
 *
 * 类适配器，继承原有的类，不推荐，破坏里氏替换原则
 * @date 2025-09-10
 */

public class SpecUserServiceAdapter1 extends UserServiceImpl implements SpecUserService {

    @Override
    public String findByJId() {
        Map<String, String> user = super.findById();
        return new Gson().toJson(user);
    }

    @Override
    public String findJUser() {
        List<Map<String, String>> users = super.findUserList();
        return new Gson().toJson(users);
    }


}
